<%--
  Created by IntelliJ IDEA.
  User: empty
  Date: 2025/5/24
  Time: 21:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>删除公告</title>
    <style>
        :root {
            --primary-color: #3b82f6;
            --primary-hover: #2563eb;
            --success-color: #34d399;
            --error-color: #ef4444;
            --neutral-light: #f8fafc;
            --neutral-medium: #e5e7eb;
            --neutral-dark: #1f2937;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Helvetica Neue', Arial, sans-serif;
            background-color: var(--neutral-light);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .container {
            max-width: 600px;
            margin: 0 auto;
            padding: 20px;
        }

        #logout {
            background-color: var(--primary-color);
            padding: 10px 20px;
            display: flex;
            justify-content: flex-end;
        }

        #logout button {
            background-color: #ffffff;
            color: var(--primary-color);
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        #logout button:hover {
            background-color: #e0e7ff;
        }

        #app {
            background-color: #ffffff;
            border-radius: 8px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            padding: 24px;
            margin: 24px 0;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        #app:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        }

        #app form {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        #app label {
            display: flex;
            flex-direction: column;
            gap: 4px;
            font-weight: 500;
            color: var(--neutral-dark);
        }

        #app input {
            padding: 10px 12px;
            border: 1px solid var(--neutral-medium);
            border-radius: 4px;
            font-size: 16px;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        #app input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
        }

        #app button {
            background-color: var(--error-color);
            color: #ffffff;
            border: none;
            padding: 12px 16px;
            border-radius: 4px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.2s;
            margin-top: 8px;
        }

        #app button:hover {
            background-color: #dc2626;
        }

        .message {
            padding: 12px;
            border-radius: 4px;
            font-size: 16px;
            text-align: center;
            animation: fadeIn 0.5s ease-in-out;
        }

        .message:empty {
            display: none;
        }

        .message.success {
            background-color: #d1fae5;
            color: #059669;
            border-left: 4px solid #34d399;
        }

        .message.error {
            background-color: #fee2e2;
            color: #b91c1c;
            border-left: 4px solid #ef4444;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }
    </style>
</head>
<body>
<div id="logout">
    <form action="user-community" name="action" method="post">
        <input type="hidden" name="action" value="returnMessage">
        <button type="submit">
            <i class="fa fa-arrow-left mr-2"></i> 返回公告首页
        </button>
    </form>
</div>
<div class="container">
    <div id="app">
        <h2 style="font-size: 20px; margin-bottom: 16px; color: var(--neutral-dark);">删除公告</h2>
        <form action="deleteAnnouncement" method="post">
            <label>
                <span>公告ID:</span>
                <input type="text" name="announcement_id" placeholder="请输入要删除的公告ID">
            </label>
            <button type="submit">
                <i class="fa fa-trash mr-2"></i> 确认删除
            </button>
        </form>
    </div>
    <div class="message ${message.contains('成功') ? 'success' : 'error'}">${message}</div>
</div>
</body>
</html>


